package com.xyz.study.design_mode.g_builder.mode;

/**
 * 角色：Director
 * @author XYZ
 * @version 1.0.0
 * @since 2021/1/19
 */
public class Director {

    private ComputerBuilder computerBuilder;

    public Director(ComputerBuilder computerBuilder){
        this.computerBuilder = computerBuilder;
    }

    public void construct(String cpu, String memory, String hardDisk, String keyboard, String mouse){
        computerBuilder.buildCPU(cpu);
        computerBuilder.buildMemory(memory);
        computerBuilder.buildHardDisk(hardDisk);
        computerBuilder.buildKeyboard(keyboard);
        computerBuilder.buildMouse(mouse);
    }
}
